﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PBOffice.DAL;
using PBOffice.Model;

namespace PBOffice.BLL
{
    public class BranchManager
    {
        BranchServcies braServices = new BranchServcies();
        /// <summary>
        /// 获取所有机构信息
        /// </summary>
        /// <returns></returns>
        public List<Branch> GetAllBranch()
        {
            return braServices.GetAllBranch(); 
        }
        /// <summary>
        /// 添加一条机构信息
        /// </summary>
        /// <param name="bra"></param>
        /// <returns></returns>
        public bool AddBranch(Branch bra)
        {
            return braServices.AddBranch(bra);
 
        }
        /// <summary>
        /// 根据机构名称获取所有机构信息
        /// </summary>
        /// <param name="BranchName"></param>
        /// <returns></returns>
        public List<Branch> GetSingleBranch(string BranchName)
        {
            return braServices.GetSingleBranch(BranchName);
 
        }
        /// <summary>
        /// 更新机构信息
        /// </summary>
        /// <param name="branch"></param>
        /// <returns></returns>
        public bool UpdateBranch(Branch branch)
        {
            return braServices.UpdateBranch(branch);
        }
        /// <summary>
        /// 删除指定ID的机构信息
        /// </summary>
        /// <param name="BranchId"></param>
        /// <returns></returns>
        public bool DeleteBranch(int BranchId)
        {
            return braServices.DeleteBranch(BranchId);
        }
    }
}
